<?php
error_reporting(E_ALL ^ E_NOTICE);
ini_set('memory_limit', '1000M');
set_time_limit(0);
while (($line_json = fgets(STDIN)) !== false) {   //line_json=>source_url\tjson��ʽ
    $line_json = trim($line_json);
    if (empty($line_json))
        continue;
    list ($key, $list_json) = explode("\t", $line_json);
    $house_info = json_decode($list_json, true);
    if ($last_key == $key){
        $house_info['bad_type'] = 23;
        $out = json_encode($house_info);
        echo $house_info['source_url']."\t".$out."#B\n";
    }
    else{
        $last_key = $key;
	echo 'personal'."\t".$list_json."#N\n";
    }
}

